# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.CloudUserAccounts.Vm_alpha.Model.User do
  @moduledoc """
  A User resource.

  ## Attributes

  - creationTimestamp (String): [Output Only] Creation timestamp in RFC3339 text format. Defaults to: `null`.
  - description (String): An optional textual description of the resource; provided by the client when the resource is created. Defaults to: `null`.
  - groups (List[String]): [Output Only] A list of URLs to Group resources who contain the user. Users are only members of groups in the same project. Defaults to: `null`.
  - id (String): [Output Only] Unique identifier for the resource; defined by the server. Defaults to: `null`.
  - kind (String): [Output Only] Type of the resource. Always clouduseraccounts#user for users. Defaults to: `null`.
  - name (String): Name of the resource; provided by the client when the resource is created. Defaults to: `null`.
  - owner (String): Email address of account&#39;s owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account. Defaults to: `null`.
  - publicKeys (List[PublicKey]): [Output Only] Public keys that this user may use to login. Defaults to: `null`.
  - selfLink (String): [Output Only] Server defined URL for the resource. Defaults to: `null`.
  """

  defstruct [
    :"creationTimestamp",
    :"description",
    :"groups",
    :"id",
    :"kind",
    :"name",
    :"owner",
    :"publicKeys",
    :"selfLink"
  ]
end

defimpl Poison.Decoder, for: GoogleApi.CloudUserAccounts.Vm_alpha.Model.User do
  import GoogleApi.CloudUserAccounts.Vm_alpha.Deserializer
  def decode(value, options) do
    value
    |> deserialize(:"publicKeys", :list, GoogleApi.CloudUserAccounts.Vm_alpha.Model.PublicKey, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudUserAccounts.Vm_alpha.Model.User do
  def encode(value, options) do
    GoogleApi.CloudUserAccounts.Vm_alpha.Deserializer.serialize_non_nil(value, options)
  end
end

